package com.example.demo.Dao;

import com.example.demo.Entity.Book;
import com.example.demo.Entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.Map;

@Mapper
public interface BookDao {
    public ArrayList<Book> selectBookByCategory(String category);

    public ArrayList<Book> selectBookByKeyWord(String keyword);

    public Book selectBookByISBN(String isbn);

    public ArrayList<Book> selectAll();

    public void createNewBook(Book book);

    public void deleteBook(String isbn);

    public void editBookTitle(@Param("isbn") String isbn, @Param("Title") String title);
    public void editBookAuthor(@Param("isbn") String isbn, @Param("Author") String author);
    public void editBookCategoryID(@Param("isbn") String isbn, @Param("CategoryID") int category);
    public void editBookPages(@Param("isbn") String isbn, @Param("Pages") int pages);
    public void editBookWords(@Param("isbn") String isbn, @Param("Words") int words);
    public void editBookPublisher(@Param("isbn") String isbn, @Param("Publisher") String publisher);
    public void editBookPrice(@Param("isbn") String isbn, @Param("Price") float price);
    public void editBookTotalCount(@Param("isbn") String isbn, @Param("TotalCount") int totalcount);
    public void editBookIntroduction(@Param("isbn") String isbn, @Param("Introduction") String introduction);
    public void editBookActionDate(@Param("isbn") String isbn, @Param("ActionDate") Date actiondate);
    public void editBookPictureUrl(@Param("isbn") String isbn, @Param("PictureUrl") String pictureurl);
    public void editBookPictureBase(@Param("isbn") String isbn, @Param("PictureBase") String picturebase);
}

